home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / ntwrkprt / maestro.x < prev    next >
Encoding:
Text File  |  1993-06-15  |  4.5 KB  |  137 lines

  1. /*
  2.  * Copyright (c) 1990, 1991, 1992 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/drapeau/NetworkProtocol/RCS/MAEstro.x,v 1.16 92/05/29 12:40:31 drapeau Exp $ */
  25. /* $Log:    MAEstro.x,v $
  26. Revision 1.16  92/05/29  12:40:31  drapeau
  27. Changed the name of the "Selection" structure to "MAESelection",
  28. to avoid name conflicts with other software packages and toolkits
  29. that might also define a "Selection" structure.
  30.  
  31. Revision 1.15  92/01/15  19:27:05  drapeau
  32. Replaced program number "99" with program number "300115",
  33. an officially assigned RPC protocol number from Sun
  34. Microsystems (rpc@sun.com).
  35.  
  36. Revision 1.14  91/09/18  12:37:12  drapeau
  37. Renamed the protocol to "MAEstro", in keeping with the project
  38. name.
  39. Also, changed the return value of the GetPortFromName()
  40. message.  It now returns a list of matching Ports, rather than just
  41. one Port.
  42.  
  43. Revision 1.13  91/09/03  16:58:35  drapeau
  44. Modified definition of GetPortFromName() message so that it returns
  45. a Port instead of a void.
  46.  
  47. Revision 1.12  91/06/19  14:11:37  drapeau
  48. Added support for five new messages:
  49.  - PauseSelection
  50.  - ResumeSelection
  51.  - HideApplication
  52.  - ShowApplication
  53.  - GetAppIcon
  54. Also, replaced the "PerformPartialSelection" message with
  55. "HaltSelection" message.
  56.  
  57. Also, modified the definition of the Selection structure, to accommodate
  58. partial selections (the offset field is for this purpose) and to allow
  59. applications to transmit brief descriptions of selections (the label field
  60. is for this purpose).
  61. In this new Selection structure, a partial selection is defined by a
  62. non-zero value in the offset field.  For example, if a Selection is 3000
  63. milliseconds long (duration = 3000) but the offset field is set to 2 seconds
  64. (offset = 2000), the resulting Selection is a partial selection, and the
  65. media editor is to attempt at "performing" only the last second of the
  66. selection (i.e., the media editor should begin 2000 milliseconds into its
  67. selection, instead of at the beginning of that selection).
  68.  
  69. Revision 1.11  91/02/28  07:18:46  drapeau
  70. No protocol specification changes; this version uses a new version
  71. numbering scheme and a new version of RCS.
  72.  
  73. Revision 1.1  90/10/24  18:29:36  drapeau
  74. Initial revision
  75.  */
  76.  
  77. /* Protocol for inter-application communication.  Originally written on 7/6/90
  78.    by George Drapeau. */
  79.  
  80.  
  81. const LabelLength = 256;
  82.  
  83. struct Port
  84. {
  85.   string    hostName<>;
  86.   string    appName<>;
  87.   int        portNumber;
  88. };
  89.  
  90. struct PortArray
  91. {
  92.   Port    portArray<>;
  93.   int    numberOfPorts;
  94. };
  95.  
  96.  
  97. struct MAESelection
  98. {
  99.   int        start;
  100.   int        end;
  101.   int        duration;                        /* Estimated time in msecs to perform selection */
  102.   int        offset;                            /* Start performance this many msecs into selection above  */
  103.   string    label<LabelLength>;                    /* Brief, descriptive text for this selection */
  104. };
  105.  
  106. struct IconData
  107. {
  108.   opaque    iconData<>;
  109.   int        dataLength;
  110. };
  111.  
  112.  
  113. program MAEstro
  114. {
  115.   version FirstTestVersion
  116.     {
  117.       void         OpenDocument(string) = 1;
  118.       string        GetCurrentDocName(void) = 2;
  119.       MAESelection    GetSelection(void) = 3;
  120.       void        SetSelection(MAESelection) = 4;
  121.       void        PerformSelection(void) = 5;
  122.       void        ConnectWithPortMgr(Port) = 6;
  123.       PortArray        GetOpenApps(void) = 7;
  124.       PortArray        GetPortFromName(Port) = 8;
  125.       void        DisconnectFromPortMgr(Port) = 9;
  126.       void        Ping(void) = 10;
  127.       void        HaltSelection(void) = 11;
  128.       void        PauseSelection(void) = 12;
  129.       void        ResumeSelection(void) = 13;
  130.       void        HideApplication(void) = 14;
  131.       void        ShowApplication(void) = 15;
  132.       IconData        GetAppIcon(void) = 16;
  133.     }
  134.   = 1;
  135. }
  136. = 300115;                                /* Official RPC number for this protocol given by rpc@sun.com */
  137.